package com.xmy.study.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Accessors(chain = true)
@TableName("edu_video")
@Data
public class EduVideo implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    @ApiModelProperty("视屏相对地址")
    private String filePath;
    @ApiModelProperty("文件大小(单位：KB)")
    private double fileSize;
    @ApiModelProperty("文件唯一标识(md5)")
    private String fileIdentifier;
    @ApiModelProperty("时长(单位：秒)")
    private Integer fileMins;
    @ApiModelProperty("视屏名称")
    private String name;
    @ApiModelProperty("教师id")
    private Long teacherId;
    @ApiModelProperty("教师姓名")
    private String teacherName;
    @ApiModelProperty("排序号")
    private Integer sort;
    @ApiModelProperty("状态：1正常，0关闭")
    private Integer status;

    @ApiModelProperty("文件的key")
    private String objectKey;
    @ApiModelProperty("每个分片大小(byte)")
    private Long chunkSize;
    @ApiModelProperty("分片数量")
    private Integer chunkNum;
    @ExcelIgnore
    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;
    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
}
